<template>
  <a_page>
    <a页头固定栏 :设置="设置" />
    <div class="row q-gutter-xs">
      <template v-for="item in 单项组" :key="item.name">
        <q-card class="my-card">
          <q-btn round size="xs" dense color="negative" icon="close" @click="设置.删(item)" class="absolute-top-right z-50" />
          <q-card-section>
            <div class="text-h6">{{ item.名称 }}:</div>
            <a数组 v-model="item.内容" />
          </q-card-section>
        </q-card>
      </template>
    </div>

    <q-dialog v-model="a.弹窗否" persistent>
      <q-card style="min-width: 350px">
        <q-card-section>
          <div class="text-h6">添加设置项</div>
        </q-card-section>
        <q-card-section class="q-pt-none">
          <q-input dense v-model="单项.名称" autofocus @keyup.enter="设置.增保存" />
        </q-card-section>
        <q-card-actions align="right">
          <q-btn flat label="取消" v-close-popup />
          <q-btn flat label="确定" v-close-popup class="text-primary" @click="设置.增保存" />
        </q-card-actions>
      </q-card>
    </q-dialog>
  </a_page>
</template>

<script setup>

import { ref, reactive, computed, watch } from 'vue'
const yy = ref()
const searchInfo = ref({})
defineOptions({
  name: '项目管理/设置/设置',
})

import use设置 from '@/hooks/use设置';
const 设置 = use设置()
const { 保存, 单项组, 单项, a } = 设置

</script>

<style lang="scss" scoped></style>